/*
 * Finals Calculator
 *
 * This file is part of Finals Calculator.
 * Finals Calculator is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * Finals Calculator is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Finals Calculator; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

/**
 * <p>The options window allowing users to set custom grading scales.</p>
 *
 * @author Jonathan Chang
 * @author Cauchy Choi
 */
public class GradingScaleWindow extends javax.swing.JFrame
{
	
	/** Creates new form GradingScaleWindow */
	public GradingScaleWindow()
	{
		initComponents();
	}
	
	/** This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
      // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
      private void initComponents()
      {
            jPanel1 = new javax.swing.JPanel();
            aPlusLabel = new javax.swing.JLabel();
            aLabel = new javax.swing.JLabel();
            aMinusLabel = new javax.swing.JLabel();
            bPlusLabel = new javax.swing.JLabel();
            bLabel = new javax.swing.JLabel();
            bMinusLabel = new javax.swing.JLabel();
            cPlusLabel = new javax.swing.JLabel();
            cLabel = new javax.swing.JLabel();
            cMinusLabel = new javax.swing.JLabel();
            dPlusLabel = new javax.swing.JLabel();
            dLabel = new javax.swing.JLabel();
            dMinusLabel = new javax.swing.JLabel();
            aPlusTextField = new javax.swing.JTextField();
            aTextField = new javax.swing.JTextField();
            aMinusTextField = new javax.swing.JTextField();
            bPlusTextField = new javax.swing.JTextField();
            bTextField = new javax.swing.JTextField();
            bMinusTextField = new javax.swing.JTextField();
            cPlusTextField = new javax.swing.JTextField();
            cTextField = new javax.swing.JTextField();
            cMinusTextField = new javax.swing.JTextField();
            dPlusTextField = new javax.swing.JTextField();
            dTextField = new javax.swing.JTextField();
            dMinusTextField = new javax.swing.JTextField();
            aPlusPercentLabel = new javax.swing.JLabel();
            aPercentLabel = new javax.swing.JLabel();
            aMinusPercentLabel = new javax.swing.JLabel();
            bPlusPercentLabel = new javax.swing.JLabel();
            bPercentLabel = new javax.swing.JLabel();
            bMinusPercentLabel = new javax.swing.JLabel();
            cPlusPercentLabel = new javax.swing.JLabel();
            cPercentLabel = new javax.swing.JLabel();
            cMinusPercentLabel = new javax.swing.JLabel();
            dPlusPercentLabel = new javax.swing.JLabel();
            dPercentLabel = new javax.swing.JLabel();
            dMinusPercentLabel = new javax.swing.JLabel();
            doneButton = new javax.swing.JButton();
            clearAllButton = new javax.swing.JButton();
            noteLabel = new javax.swing.JLabel();

            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Set the Custom Grading Scale..."));
            aPlusLabel.setText("Minimum Percent for an A+:");

            aLabel.setText("Minimum Percent for an A:");

            aMinusLabel.setText("Minimum Percent for an A-:");

            bPlusLabel.setText("Minimum Percent for a B+:");

            bLabel.setText("Minimum Percent for a B:");

            bMinusLabel.setText("Minimum Percent for a B-:");

            cPlusLabel.setText("Minimum Percent for a C+:");

            cLabel.setText("Minimum Percent for a C:");

            cMinusLabel.setText("Minimum Percent for a C-:");

            dPlusLabel.setText("Minimum Percent for a D+:");

            dLabel.setText("Minimum Percent for a D:");

            dMinusLabel.setText("Minimum Percent for a D-:");

            aPlusTextField.setText("97");

            aTextField.setText("93");

            aMinusTextField.setText("90");

            bPlusTextField.setText("87");

            bTextField.setText("83");

            bMinusTextField.setText("80");

            cPlusTextField.setText("77");

            cTextField.setText("73");

            cMinusTextField.setText("70");

            dPlusTextField.setText("69");

            dTextField.setText("63");

            dMinusTextField.setText("60");

            aPlusPercentLabel.setText("%");

            aPercentLabel.setText("%");

            aMinusPercentLabel.setText("%");

            bPlusPercentLabel.setText("%");

            bPercentLabel.setText("%");

            bMinusPercentLabel.setText("%");

            cPlusPercentLabel.setText("%");

            cPercentLabel.setText("%");

            cMinusPercentLabel.setText("%");

            dPlusPercentLabel.setText("%");

            dPercentLabel.setText("%");

            dMinusPercentLabel.setText("%");

            org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                  jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                  .add(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, aPlusLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, aLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, aMinusLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, bPlusLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, bLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, bMinusLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, cPlusLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, cLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, cMinusLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, dPlusLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, dLabel)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, dMinusLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                              .add(dPlusTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(dTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(dMinusTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, cMinusTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(cTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(cPlusTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(bMinusTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(bTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(bPlusTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(aMinusTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(aTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                              .add(aPlusTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                              .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                          .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                                      .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                                            .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                                                  .add(aPercentLabel)
                                                                  .add(aPlusPercentLabel))
                                                            .add(aMinusPercentLabel))
                                                      .add(bPlusPercentLabel)
                                                      .add(bPercentLabel)
                                                      .add(bMinusPercentLabel)
                                                      .add(cPlusPercentLabel))
                                                .add(cPercentLabel))
                                          .add(cMinusPercentLabel)
                                          .add(dPlusPercentLabel))
                                    .add(dPercentLabel))
                              .add(dMinusPercentLabel))
                        .addContainerGap())
            );
            jPanel1Layout.setVerticalGroup(
                  jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                  .add(jPanel1Layout.createSequentialGroup()
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(aPlusLabel)
                              .add(aPlusTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(aPlusPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(aLabel)
                              .add(aTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(aPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(aMinusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(aMinusTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(aMinusPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(bPlusLabel)
                              .add(bPlusTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(bPlusPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(bLabel)
                              .add(bTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(bPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(bMinusLabel)
                              .add(bMinusTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(bMinusPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(cPlusLabel)
                              .add(cPlusTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(cPlusPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(cLabel)
                              .add(cTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(cPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(cMinusLabel)
                              .add(cMinusTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(cMinusPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(dPlusLabel)
                              .add(dPlusTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(dPlusPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(dLabel)
                              .add(dTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(dPercentLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(dMinusLabel)
                              .add(dMinusTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                              .add(dMinusPercentLabel))
                        .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            );

            doneButton.setText("Done");
            doneButton.addActionListener(new java.awt.event.ActionListener()
            {
                  public void actionPerformed(java.awt.event.ActionEvent evt)
                  {
                        doneButtonActionPerformed(evt);
                  }
            });

            clearAllButton.setText("Clear All");
            clearAllButton.addActionListener(new java.awt.event.ActionListener()
            {
                  public void actionPerformed(java.awt.event.ActionEvent evt)
                  {
                        clearAllButtonActionPerformed(evt);
                  }
            });

            noteLabel.setText("<html>Note: Make sure percentages are in descending order from A-D </html>");

            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                  layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                  .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                              .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                                    .addContainerGap()
                                    .add(clearAllButton)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(doneButton))
                              .add(layout.createSequentialGroup()
                                    .addContainerGap()
                                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                                          .add(org.jdesktop.layout.GroupLayout.LEADING, noteLabel, 0, 0, Short.MAX_VALUE)
                                          .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                        .addContainerGap(10, Short.MAX_VALUE))
            );
            layout.setVerticalGroup(
                  layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                  .add(layout.createSequentialGroup()
                        .addContainerGap()
                        .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(noteLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                              .add(doneButton)
                              .add(clearAllButton))
                        .addContainerGap())
            );
            pack();
      }// </editor-fold>//GEN-END:initComponents

	private void clearAllButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_clearAllButtonActionPerformed
	{//GEN-HEADEREND:event_clearAllButtonActionPerformed
		//Clear all jTextFields
		aPlusTextField.setText("");
		aTextField.setText("");
		aMinusTextField.setText("");
		bPlusTextField.setText("");
		bTextField.setText("");
		bMinusTextField.setText("");
		cPlusTextField.setText("");
		cTextField.setText("");
		cMinusTextField.setText("");
		dPlusTextField.setText("");
		dTextField.setText("");
		dMinusTextField.setText("");
	}//GEN-LAST:event_clearAllButtonActionPerformed

	/**
	 * Called when the Done button is clicked.
	 *
	 * @param evt The window event that tells if the Done button was clicked
	 */
	private void doneButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_doneButtonActionPerformed
	{//GEN-HEADEREND:event_doneButtonActionPerformed
		//If the values are all valid, close this window
		if (check())
			this.setVisible(false);
	}//GEN-LAST:event_doneButtonActionPerformed
	
	
	/**
	 * Make sure the values in the <code>jTextFields</code> are actually possible.
	 *
	 * @return true if they are, false if they are not
	 */
	private boolean check()
	{
		//Get the values in the jTextFields
		double[] scale = getScale();
		
		//Loop to check if the values are possible.
		for (int x = 0; x < 11; x++)
		{
			if (scale[x] < scale[x + 1])
				return false;
		}
		//If they are all possible, return true
		return true;
	}
	
	
	/**
	 * Puts the grading scale values into an array in decimal form.
	 *
	 * @return The <code>double[] array</code> with the grading scale values
	 */
	public double[] getScale()
	{
		//Create and return array of doubles that has the Grading Scale Values.
		double[] scale = new double[12];
		scale[0] = Double.parseDouble(aPlusTextField.getText()) / 100;
		scale[1] = Double.parseDouble(aTextField.getText()) / 100;
		scale[2] = Double.parseDouble(aMinusTextField.getText()) / 100;
		scale[3] = Double.parseDouble(bPlusTextField.getText()) / 100;
		scale[4] = Double.parseDouble(bTextField.getText()) / 100;
		scale[5] = Double.parseDouble(bMinusTextField.getText()) / 100;
		scale[6] = Double.parseDouble(cPlusTextField.getText()) / 100;
		scale[7] = Double.parseDouble(cTextField.getText()) / 100;
		scale[8] = Double.parseDouble(cMinusTextField.getText()) / 100;
		scale[9] = Double.parseDouble(dPlusTextField.getText()) / 100;
		scale[10] = Double.parseDouble(dTextField.getText()) / 100;
		scale[11] = Double.parseDouble(dMinusTextField.getText()) / 100;
		
		return scale;
	}
	
	
      // Variables declaration - do not modify//GEN-BEGIN:variables
      private javax.swing.JLabel aLabel;
      private javax.swing.JLabel aMinusLabel;
      private javax.swing.JLabel aMinusPercentLabel;
      private javax.swing.JTextField aMinusTextField;
      private javax.swing.JLabel aPercentLabel;
      private javax.swing.JLabel aPlusLabel;
      private javax.swing.JLabel aPlusPercentLabel;
      private javax.swing.JTextField aPlusTextField;
      private javax.swing.JTextField aTextField;
      private javax.swing.JLabel bLabel;
      private javax.swing.JLabel bMinusLabel;
      private javax.swing.JLabel bMinusPercentLabel;
      private javax.swing.JTextField bMinusTextField;
      private javax.swing.JLabel bPercentLabel;
      private javax.swing.JLabel bPlusLabel;
      private javax.swing.JLabel bPlusPercentLabel;
      private javax.swing.JTextField bPlusTextField;
      private javax.swing.JTextField bTextField;
      private javax.swing.JLabel cLabel;
      private javax.swing.JLabel cMinusLabel;
      private javax.swing.JLabel cMinusPercentLabel;
      private javax.swing.JTextField cMinusTextField;
      private javax.swing.JLabel cPercentLabel;
      private javax.swing.JLabel cPlusLabel;
      private javax.swing.JLabel cPlusPercentLabel;
      private javax.swing.JTextField cPlusTextField;
      private javax.swing.JTextField cTextField;
      private javax.swing.JButton clearAllButton;
      private javax.swing.JLabel dLabel;
      private javax.swing.JLabel dMinusLabel;
      private javax.swing.JLabel dMinusPercentLabel;
      private javax.swing.JTextField dMinusTextField;
      private javax.swing.JLabel dPercentLabel;
      private javax.swing.JLabel dPlusLabel;
      private javax.swing.JLabel dPlusPercentLabel;
      private javax.swing.JTextField dPlusTextField;
      private javax.swing.JTextField dTextField;
      private javax.swing.JButton doneButton;
      private javax.swing.JPanel jPanel1;
      private javax.swing.JLabel noteLabel;
      // End of variables declaration//GEN-END:variables
	
}
